package com.dk.controller;

import com.dk.pojo.Student;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("student")
public class StudentController {

    private Logger logger = LoggerFactory.getLogger(StudentController.class);

    @Autowired
    private Student student;

    @RequestMapping("getStudent")
    @ResponseBody
    public Student getStudent() {
        logger.debug("debug日志打印成功");
        logger.info("info日志打印成功");
        logger.warn("warn日志打印成功");
        logger.error("error日志打印成功");
        return student;
    }
}
